// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addUserApi POST /api/user_api/add */
export async function addUserApiUsingPOST(
  body: API.UserApiInfoAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/user_api/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteUserApi POST /api/user_api/delete */
export async function deleteUserApiUsingPOST(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/user_api/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getUserApiById GET /api/user_api/get */
export async function getUserApiByIdUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserApiByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseUserApiInfo_>('/api/user_api/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listUserApi POST /api/user_api/list */
export async function listUserApiUsingPOST(
  body: API.UserApiInfoQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListUserApiInfo_>('/api/user_api/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listUserApiByPage POST /api/user_api/list/page */
export async function listUserApiByPageUsingPOST(
  body: API.UserApiInfoQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageUserApiInfo_>('/api/user_api/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** updateUserApi POST /api/user_api/update */
export async function updateUserApiUsingPOST(
  body: API.UserApiInfoUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/user_api/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
